'''
python 中单例模式
'''

class Student(object):
    
    __instance =None
    def __new__(cls):
        if cls.__instance is None:
            cls.__instance=object.__new__(cls)
            return cls.__instance
        else:
           return cls.__instance

s1=Student()
s2=Student()

print(s1==s2)